<?php

/**
 * Created by PhpStorm.
 * User: mj
 * Date: 17-6-7
 * Time: 下午7:48
 */
namespace App\Winged\Patients\Repository ;


use App\Winged\Patients\Api\User;
use Illuminate\Http\Request;

class UserRepository
{
    protected $defaultPage = 0;

    protected $defaultPageSize = 10 ;


    public function all()
    {
        $currentPage = request()->input('index', $this->defaultPage);
        $currentPageSize = request()->input('number' ,$this->defaultPageSize);
        $user = User::users($currentPage,$currentPageSize);
        return $user;
    }

    public function exceptAdmin(){
        $currentPage = request()->input('page', $this->defaultPage);
        $currentPageSize = request()->input('page_size' ,$this->defaultPageSize);
        $user = User::users($currentPage,$currentPageSize);
        return $user;
    }
}
